import request from '@/utils/request';

// 一点一档概览获取
export function getOverview (id) {
  return request({
    url: `/monitor/autovaluatehourdata/overview/${id}`,
    method: "get",
  });
}

// 一点一档_水质分类分布（按日）
export function getWaterClassification (data) {
  return request({
    url: "/monitor/autovaluatedaydata/qualityLevelStatis",
    method: "get",
    params: data,
  });
}
// 一点一档_水质分类分布（按月）
export function getWaterClassificationMonth (data) {
  return request({
    url: "/monitor/autovaluatemonthdata/qualityLevelStatis",
    method: "get",
    params: data,
  });
}

// 一点一档_水质分类分布（按月）手工
export function getWaterClassificationSg (data) {
  return request({
    url: "/monitor/integrationevaluatedata/qualityLevelStatis",
    method: "get",
    params: data,
  });
}

// 一点一档_水质分类分布（按年）手工
export function getWaterClassificationMonthSg (data) {
  return request({
    url: "/monitor/integrationevaluatedatayear/qualityLevelStatis",
    method: "get",
    params: data,
  });
}

// 一点一档_污染物超标次数统计（按日）
export function getPollutant (data) {
  return request({
    url: "/monitor/autovaluatehourdata/statisItemCount",
    method: "get",
    params: data,
  });
}

// 一点一档_污染物超标次数统计（按月）
export function getPollutantMonth (data) {
  return request({
    url: "/monitor/autovaluatedaydata/statisItemCount",
    method: "get",
    params: data,
  });
}

// 一点一档_污染物超标次数统计（按月）手工
export function getPollutantSg (data) {
  return request({
    url: "/monitor/integrationevaluatedata/statisItemCount",
    method: "get",
    params: data,
  });
}

// 一点一档_污染物超标次数统计（按年）手工
export function getPollutantYearSg (data) {
  return request({
    url: "/monitor/integrationevaluatedatayear/statisItemCount",
    method: "get",
    params: data,
  });
}



// 一点一档_水质变化趋势（小时）
export function getWaterTrend (data) {
  return request({
    url: "/monitor/autovaluatehourdata/trendStatis",
    method: "get",
    params: data,
  });
}

// 一点一档_水质变化趋势（天）
export function getWaterTrendDay (data) {
  return request({
    url: "/monitor/autovaluatedaydata/trendStatis",
    method: "get",
    params: data,
  });
}

// 一点一档_水质变化趋势（月）
export function getWaterTrendMonth (data) {
  return request({
    url: "/monitor/autovaluatemonthdata/trendStatis",
    method: "get",
    params: data,
  });
}

//手工站水质变化趋势（月）
export function getHandWaterTrendMonth (data) {
  return request({
    url: "/monitor/integrationevaluatedata/trendStatis",
    method: "get",
    params: data,
  });
}

//手工站水质变化趋势（年）
export function getHandWaterTrendYear (data) {
  return request({
    url: "/monitor/integrationevaluatedatayear/trendStatis",
    method: "get",
    params: data,
  });
}

// 自动站水质日历--自动站
export function getAutoWaterCalendar (data) {
  return request({
    url: "/monitor/autovaluatedaydata/statisCalendar",
    method: "get",
    params: data,
  });
}

// 自动站水质日历详情

export function getAutoWaterCalendarDetail (data) {
  return request({
    url: "/monitor/autodaydata/statisCalendarDetail",
    method: "get",
    params: data,
  });
}

// 手工站水质日历--手工站
export function getHandWaterCalendar (data) {
  return request({
    url: "/monitor/integrationevaluatedata/statisCalendar",
    method: "get",
    params: data,
  });
}

// 手工站水质日历详情
export function getHandWaterCalendarDetail (data) {
  return request({
    url: "/monitor/integrationevaluatedata/statisCalendarDetail",
    method: "get",
    params: data,
  });
}

// 一河一档获取河流树
export function getRiverTree () {
  return request({
    url: "/base/river/treeList",
    method: "get",
    // params: query,
  });
}



// 一河一档_闸口列表获取
export function getZkList (data) {
  return request({
    url: "/base/watergate/list",
    method: "get",
    params: data,
  });
}

// 一河一档_闸口获取行间详情
export function getZkRowDetail (id) {
  return request({
    url: `/base/watergate/getinfo/${id}`,
    method: "get",
    // params: data,
  });
}

// 一河一档_闸口删除
export function deleteZk (id) {
  return request({
    url: `/base/watergate/remove/${id}`,
    method: "get",
  });
}
// 一河一档_闸口新增
export function zkAdd (data) {
  return request({
    url: `/base/watergate/add`,
    method: "post",
    data: data,
  });
}
// 一河一档_闸口编辑
export function zkAEdit (data) {
  return request({
    url: `/base/watergate/edit`,
    method: "post",
    data: data,
  });
}

// 《------------------------------------工业污染源------------------------------》
// 一河一档_工业污染源列表获取
export function gyList (data) {
  return request({
    url: `/base/pollutionsource/list`,
    method: "get",
    params: data,
  });
}

// 一河一档_工业污染源获取行间详情
export function gyRowDetail (id) {
  return request({
    url: `/base/pollutionsource/${id}`,
    method: "get",
    // params: data,
  });
}

// 一河一档_工业污染源删除
export function deleteGy (id) {
  return request({
    url: `/base/pollutionsource/${id}`,
    method: "DELETE",
  });
}

// 一河一档_工业污染源新增
export function gyAdd (data) {
  return request({
    url: `/base/pollutionsource`,
    method: "post",
    data: data,
  });
}

// 一河一档_工业污染源编辑
export function gyAEdit (data) {
  return request({
    url: `/base/pollutionsource`,
    method: "put",
    data: data,
  });
}

// 《------------------------------------排污口------------------------------》
//  一河一档_获取排污口列表
export function getPollutionList (data) {
  return request({
    url: `/pwk/rhoutfall/list`,
    method: "get",
    params: data,
  });
}

// 一河一档_获取排污口详情
export function getPollutionDetail (id) {
  return request({
    url: `/pwk/rhoutfall/${id}`,
    method: "get",
    // params: data,
  });
}

// 一河一档_获取排污口删除
export function deletePollution (id) {
  return request({
    url: `/pwk/rhoutfall/${id}`,
    method: "DELETE",
  });
}

// 一河一档_获取排污口新增
export function addPollution (data) {
  return request({
    url: `/pwk/rhoutfall`,
    method: "POST",
    data: data,
  });
}

// 一河一档_获取排污口编辑
export function editPollution (data) {
  return request({
    url: `/pwk/rhoutfall`,
    method: "PUT",
    data: data,
  });
}

// 《-------------------公共设施----------------------》
// 公共设施_获取列表
export function getPublicFacilitiesList (data) {
  return request({
    url: "/base/spacefacility/list",
    method: "get",
    params: data,
  });
}

// 公共设施_获取详情
export function getPublicFacilitiesDetail (id) {
  return request({
    url: `/base/spacefacility/${id}`,
    method: "get",
  });
}

// 公共设施_添加
export function addPublicFacilities (data) {
  return request({
    url: "/base/spacefacility",
    method: "post",
    data,
  });
}

// 公共设施_删除
export function deletePublicFacilities (id) {
  return request({
    url: `/base/spacefacility/${id}`,
    method: "delete",
  });
}

// 公共设施_修改
export function updatePublicFacilities (data) {
  return request({
    url: `/base/spacefacility`,
    method: "put",
    data,
  });
}

// 《-------------------农业面源----------------------》
// 农业面源_获取列表
export function getFarmingMyList (params) {
  return request({
    url: "/base/agriculture/list",
    method: "get",
    params,
  });
}

// 农业面源_添加
export function addFarmingMy (data) {
  return request({
    url: "/base/agriculture",
    method: "post",
    data,
  });
}

// 农业面源_修改
export function updateFarmingMy (data) {
  return request({
    url: "/base/agriculture",
    method: "put",
    data,
  });
}

// 农业面源_删除
export function deleteFarmingMy (id) {
  debugger
  return request({
    url: `/base/agriculture/${id}`,
    method: "delete",
  });

}

// 农业面源_获取详情
export function getFarmingMyDetail (id) {
  return request({
    url: `/base/agriculture/${id}`,
    method: "get",
  });
}
